package com.gupaoedu.mybatis.mywant;


import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;

public class Configaration {
    public   <T> T  getMapper(Class<T> c,MySqlSession sqlSession) {
        return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(),new Class[]{c},new MapperProxy<>(sqlSession,c));
    }
    static class  TestMapperXML {
        public static final String nameSpace = "com.gupaoedu.mybatis.my.TestMapper";

        public final static Map Mapper=new HashMap();

        static {
          Mapper.put("selByOne","select * from book where id = %d"); //方法名和 sql
        }
    }
}
